﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using XamlingCore.Infrastructure.Dialog;
using XamlingCore.Infrastructure.SystemMessage;

namespace XamlingCore.Infrastructure.View.Implementation
{
    public class SystemMessageDialogViewModel : ShowDialogViewModelBase
    {
        private SystemMessagePackage package;

        public SystemMessageDialogViewModel(SystemMessagePackage package)
        {
            this.package = package;

            var newMessage = new DialogMessage()
            {
                Body = package.Message,
                Title = package.Title,
                MessageButtons = DialogMessageButtons.Okay,
                MessageType = package.IsError ?  DialogMessageType.Error : DialogMessageType.Info
            };

            DialogMessage = newMessage;
        }
    }
}
